package SV_SENSITIVE_DATA;
import java.io.IOException;
import java.io.Writer;
public class Vulnerable_03 {
    public class WritePatient {
        public void writePatientInfo(Writer writer, Patient patient) throws IOException {
            StringBuilder sb = new StringBuilder();
            sb.append(patient.getName());
            sb.append(';');
            sb.append(patient.getDob());
            sb.append(';');
            sb.append(patient.getAddress());
            writer.write(sb.toString());
        }
        public static class Patient {
            public String getName() { return "John Doe"; }
            public String getDob() { return "1900-01-01"; }
            public String getAddress() { return "123 Main St., Cityville, NY 12345"; }
        }
    }

}
